home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / tengtex / tengtex.sty < prev    next >
Text File  |  1994-10-02  |  27KB  |  890 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % tengtex.sty  (TengTeX for LaTeX)
  3. % 22 September 1994
  4. % Version 1.00
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. % Ivan A Derzhanski
  7. % Centre for Cognitive Science
  8. % University of Edinburgh
  9. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  10.  
  11. \def \TengTeX {T\ama@tehta {\char19}{\~g}\TeX }
  12.  
  13.  
  14. %%%%%%%%%%%%%%%%%%%%%%%%%%% fount selection %%%%%%%%%%%%%%%%%%%%%%%%%%%
  15.  
  16. \newif \if@nofount
  17.  
  18. \def \@jcb{\jcb} \def \@mpu{\mpu}
  19.  
  20. \def \mere@tengwanda{%
  21.   \loop
  22.     \ifx \@tengwanda \undefined
  23.       \message{Choose a tengwar fount (\string\jcb\space or \string\mpu): }%
  24.       \read-1 to\@answer
  25.       \ifx \@answer \@jcb \jcb \else \ifx \@answer \@mpu \mpu%
  26.       \else \message{None of these Orkish jokes, please.^^J}\fi\fi
  27.   \repeat}
  28.  
  29.  
  30. %%%%%%%%%%%%% character definitions common to both founts %%%%%%%%%%%%%
  31.  
  32. \def\l@p#1#2{\setbox0=\hbox{#2}\ooalign{\box0\crcr\hidewidth#1\hidewidth}}%
  33.  
  34. \chardef \tanta@Oman="80
  35.  
  36. \chardef \@tinco=`t  \chardef \@TUle=`T   \chardef \@Ore=`R
  37. \chardef \@ando=`d   \chardef \@anto=`D   \chardef \@nUmen=`n
  38.  
  39. \chardef \@parma=`p  \chardef \@formen=`f \chardef \@vala=`w
  40. \chardef \@umbar=`b  \chardef \@ampa=`v   \chardef \@malta=`m
  41.  
  42. \chardef \@quesse=`k \chardef \@hwesta=`K \chardef \@Noldo=`Y
  43. \chardef \@ungwe=`g  \chardef \@unque=`G  \chardef \@Nwalme=`N
  44.  
  45. \chardef \@lambe=`l  \chardef \@alda=`L   \chardef \@rOmen=`r
  46. \chardef \@anga=`j   \chardef \@silme=`s  \chardef \@esse=`z
  47.  
  48. \chardef \@quessiEva="80 % Quenya:  _q_ expecting _u_
  49. \chardef \@unquiEva="81  % Quenya: _nq_ expecting _u_
  50.  
  51. \chardef \@phormen="82   % Sindarin: _ph_
  52.  
  53. \chardef \i@iEva="83     % Beleriandic Sindarin: sentence-initial _i_
  54.  
  55.  
  56. %%%%%%%%%%%%%%%%%%%%% Julian Bradfield's  tengwar %%%%%%%%%%%%%%%%%%%%%
  57.  
  58. \def \jcb{\globaldefs=1%
  59. \font \jcb@tengwar=teng10\let \@tengwanda \jcb@tengwar
  60. \hyphenchar\jcb@tengwar=-1 % hyphenation in tengwar suppressed
  61. \emergencystretch=2em % but we can do some extra stretching
  62. %
  63. \chardef \a@tehta=`a
  64. \chardef \e@tehta=`e \let \@E@tehta \tanta@Oman
  65. \chardef \i@tehta=`i
  66. \chardef \o@tehta=`o \let \@O@tehta \tanta@Oman
  67. \chardef \u@tehta=`u \let \@U@tehta \tanta@Oman
  68. %
  69. \def \E@tehta {e\kern-.15eme}%
  70. \def \O@tehta {o\kern-.25emo}%
  71. \def \U@tehta {u\kern-.35emu}%
  72. %
  73. \chardef \sinta@kolindo=`@
  74. \chardef \anda@kolindo=`*
  75. %
  76. \chardef \@calma=`c
  77. \chardef \@Harma=`C  \chardef \@anna=`y
  78. \chardef \@anca=`J   \chardef \@wilya=`W
  79. %
  80. \chardef \@arda=`\&  \chardef \@hyarmen=`h
  81. \chardef \@silme@nuquerna=`S \chardef \@esse@nuquerna=`Z
  82. \chardef \@yanta=`I  \chardef \@Ure=`U
  83. \chardef \@hwesta@sindarinwa=`H
  84. \chardef \@halla=`|
  85. %
  86. \def \uOman@tehta ##1##2{% no following vowel
  87.   \ifx ##2\@lambe {\l@p {\raise.5ex\hbox{^^E}}{##1}}\else {\l@p ^^E{##1}}\fi}%
  88. %
  89. \def \T@nun@tehta ##1{{\l@p ^^B{##1}}}% doubling a narrow tengwa
  90. \let \D@nun@tehta \T@nun@tehta % doubling a wide tengwa
  91. \def \L@nun@tehta ##1{##1\raise.75ex\hbox to 0pt{\hss^^B}}% doubling _l_
  92. %
  93. \def \y@nun@tehta ##1{{\l@p ^^Y{##1}}}% _y_ following something
  94. \def \l@nun@tehta ##1{##1\raise.75ex\hbox to 0pt{\hss^^Y}}% _y_ following _l_
  95. \def \r@nun@tehta ##1{\raise.2ex\hbox to 0pt{^^Y\hss}##1}%  _y_ following _r_
  96. %
  97. \def \s@nun@tehta ##1{##1\kern-0.3em^^T}%  _s_ following something
  98. \def \x@nun@tehta ##1{##1\kern-0.05em^^T}% _s_ following _c_ or _l_
  99. %
  100. \chardef \y@tehta="22
  101. %
  102. \chardef \arka@ama@falma="0F % prenasalisation for a narrow tengwa
  103. \chardef \landa@ama@falma="0F %  prenasalisation for a wide tengwa
  104. \chardef \w@tehta="16
  105. %
  106. \chardef \a@tengwa=`A  \chardef \o@tengwa=`y  \chardef \y@tengwa=`S
  107. %
  108. \chardef \@andaith=`e
  109. %
  110. \globaldefs=0}
  111.  
  112.  
  113. %%%%%%%%%%%%%%%%%%%%%%% Michael Urban's tengwar %%%%%%%%%%%%%%%%%%%%%%%
  114.  
  115. \def \mpu{\globaldefs=1%
  116. \font \mpu@tengwar=tengwar\global \let \@tengwanda \mpu@tengwar
  117. \hyphenchar\mpu@tengwar=-1 % hyphenation in tengwar suppressed
  118. \emergencystretch=2em % but we can do some extra stretching
  119. %
  120. \chardef \a@tehta="5E
  121. \chardef \e@tehta="13
  122. \chardef \i@tehta="5F
  123. \chardef \o@tehta="14
  124. \chardef \u@tehta="15
  125. \chardef \E@tehta="7D
  126. \chardef \O@tehta="16
  127. \chardef \U@tehta="17
  128. %
  129. \chardef \sinta@kolindo=`i
  130. \chardef \anda@kolindo="10
  131. %
  132. \chardef \@calma=`C  \chardef \@Harma=`S  \chardef \@anna=`O
  133. \chardef \@anca=`Z   \chardef \@wilya=`A
  134. %
  135. \chardef \@arda="12  \chardef \@hyarmen=`h
  136. \chardef \@silme@nuquerna="03 \chardef \@esse@nuquerna="1A
  137. \chardef \@yanta=`e  \chardef \@Ure=`u
  138. \chardef \@hwesta@sindarinwa="0F
  139. \chardef \@halla="11
  140. %
  141. \def \uOman@tehta ##1##2{\l@p ^^Y{##1}}% no following vowel
  142. %
  143. \def \T@nun@tehta ##1{\l@p ^^H{##1}}% doubling a narrow tengwa
  144. \def \D@nun@tehta ##1{\l@p {\char9}{##1}}% doubling a wide tengwa
  145. \def \L@nun@tehta ##1{##1\llap ^^H}% doubling lambe
  146. %
  147. \def \y@nun@tehta ##1{\l@p ^^X{##1}}% _y_ following something
  148. \let \l@nun@tehta \y@nun@tehta
  149. \def \r@nun@tehta ##1{##1\lower.2ex\hbox to1.5pt{\hss^^X}}% _y_ following _r_
  150. %
  151. \def \s@nun@tehta ##1{##1\kern-0.3em\char28}%  _s_ following something
  152. \def \x@nun@tehta ##1{##1\kern-0.05em\char28}% _s_ following _c_ or _l_
  153. %\def \s@nun@tehta ##1{##1\lower1.5ex\hbox to3pt{\hss^^U}}% _s_ after something
  154. %\def \x@nun@tehta ##1{##1\lower1.5ex\hbox to3pt{\hss^^U}}% _s_ after _c_ or _l_
  155. %
  156. \chardef \y@tehta="7F
  157. %
  158. \chardef \arka@ama@falma="0A % prenasalisation for a narrow tengwa
  159. \chardef \landa@ama@falma="0B % prenasalisation for a wide tengwa
  160. \chardef \w@tehta="1E
  161. %\def\w@tehta##1{##1\raise .9ex\hbox to 0pt{\hss\char"2D}}
  162. %
  163. \chardef \a@tengwa=`a  \chardef \o@tengwa=`o  \chardef \y@tengwa=`y
  164. %
  165. \chardef \@andaith="13
  166. %
  167. \globaldefs=0}
  168.  
  169.  
  170. %%%%%%%%%%%%%%%% macro definitions common to all modes %%%%%%%%%%%%%%%%
  171.  
  172. \long \def \kara@Ukerta #1{%
  173.     \ifcase \nato@nostale \or \quetto@metta \or \m@m \fi
  174.     \ifx \@sptoken \hilde@kerta \space \fi
  175.     #1\nato@nostale=0}
  176.  
  177. \newcount \nato@nostale % class of input token
  178.                         % 0: waiting, 1: word, 2: number
  179.  
  180. \long \def \tUva@kerta #1{%
  181.   \ifx #1\end\relax
  182.     \ifcase \nato@nostale \or \quetto@metta \or \m@m \fi
  183.     \let \next \end
  184.   \else \ifcat z\noexpand#1\relax
  185.     \ifnum 1=\nato@nostale
  186.       \ifx \@sptoken \hilde@kerta
  187.         \quetto@metta \space \vinya@quetta
  188.       \fi
  189.     \else
  190.       \ifnum 2=\nato@nostale \m@m \fi
  191.       \ifx \@sptoken \hilde@kerta \space \fi
  192.       \vinya@quetta
  193.     \fi
  194.     \expandafter \kara@kerta \m@m >#1%
  195.     \nato@nostale=1%
  196.   \else \ifcat .\noexpand#1\relax
  197.     \chardef \@ch=`#1\relax
  198.     \ifnum \@ch<48 \kara@Ukerta #1%
  199.     \else \ifnum \@ch<58
  200.       \ifnum 2=\nato@nostale
  201.         \ifx \@sptoken \hilde@kerta
  202.           \m@m \space \def \m@m {}%
  203.         \fi
  204.       \else
  205.         \ifnum 1=\nato@nostale \quetto@metta \fi
  206.         \ifx \@sptoken \hilde@kerta \space \fi
  207.         \def \m@m {}%
  208.       \fi
  209.       \edef \m@m {#1\m@m}%
  210.       \nato@nostale=2%
  211.     \else \kara@Ukerta #1%
  212.     \fi\fi
  213.   \else \kara@Ukerta #1%
  214.   \fi\fi
  215.   \def \next {\futurelet \hilde@kerta \tUva@kerta}%
  216.   \fi
  217.   \next}
  218.  
  219. \def \elvish {% Elvish environment
  220.   \mere@tengwanda%
  221.   \@tengwanda%
  222.   \nato@nostale=0%
  223.   \tUva@kerta }
  224. \def \endelvish {}
  225.  
  226. \def \quetta #1{\begin{elvish}#1 \end{elvish}} % short quotation
  227.  
  228. \def \ama@tehta #1#2{% allocate superscript tehta
  229.   \leavevmode \vbox \bgroup
  230.   \baselineskip 0pt\lineskip 0pt%
  231.   \halign {\hss ##\unskip \hss \cr #1\vadjust {\vskip -1ex}\cr #2\cr }%
  232.   \egroup }
  233.  
  234. \def \Oman@tengwa #1#2{% put vowel tehta over tengwa, inverting silme and esse
  235.   \ifx #1\@silme \@Oman@tengwa #2\@silme@nuquerna
  236.   \else \ifx #1\@esse \@Oman@tengwa #2\@esse@nuquerna
  237.   \else \@Oman@tengwa #2#1%
  238.   \fi\fi}
  239.  
  240. \def \@Oman@tengwa #1#2{% put vowel tehta over tengwa
  241.   \expandafter \ifx \csname @#1@tehta\endcsname \tanta@Oman
  242.     \expandafter \ama@tehta \csname #1@tehta\endcsname #2%
  243.   \else \expandafter \accent \csname #1@tehta\endcsname #2\fi}
  244.  
  245. \def \tehta@tengwa #1#2{% put consonant tehta over tengwa,
  246.                         % inverting silme and esse
  247.   \ifx #1\@silme \accent #2\@silme@nuquerna
  248.   \else \ifx #1\@esse \accent #2\@esse@nuquerna
  249.   \else \accent #2#1%
  250.   \fi\fi}
  251.  
  252. \def \nun@tehta #1#2{% allocate subscript consonant tehta
  253.   \ifx #2:#1\else \expandafter \csname #2@nun@tehta\endcsname {#1}\fi}
  254.  
  255.  
  256. %%%%%%%%%%%%%%%%%%%% macro definitions  for Quenya %%%%%%%%%%%%%%%%%%%%
  257.  
  258. \newif \if@light
  259. \let \heavyvocalise \@lightfalse
  260. \let \lightvocalise \@lighttrue
  261.  
  262. \def \quenya {%
  263.   \let \kara@kerta \q@kerta
  264.   \def \vinya@quetta {\def \m@m {\sinta@kolindo ::}}%
  265.   \def \quetto@metta {\expandafter \@@teka \m@m>}}
  266.  
  267. \def \@@teka #1#2#3#4>{%
  268.   \ifx #1\sinta@kolindo \ifx #3:\ifx \relax #4\relax \else \@teka #4<>\fi
  269.   \else \@teka #4#1#2#3<>\fi \else \@teka #4#1#2#3<>\fi}
  270.  
  271. \def \@teka #1#2#3#4#5>{%
  272.   \ifx #3:%
  273.     \ifx #1\@halla \@halla
  274.     \else \ifx #4\anda@kolindo \nun@tehta #1#2%
  275.     \else \ifx #4\@yanta \nun@tehta #1#2%
  276.     \else \ifx #4\@Ure \nun@tehta #1#2%
  277.     \else
  278.       \def \q@c@n {\ifx #1\@rOmen \@Ore \else #1\fi}%
  279.       \if@light \expandafter \uOman@tehta {\nun@tehta \q@c@n #2}#1%
  280.       \else \nun@tehta \q@c@n #2\fi
  281.     \fi\fi\fi\fi
  282.   \else \ifx #1\@rOmen
  283.     \ifx #2s\s@nun@tehta {\q@c@v \@Ore #3}%
  284.     \else \nun@tehta {\q@c@v \@rOmen #3}#2%
  285.     \fi
  286.   \else \ifx #1\@quessiEva \nun@tehta {\q@c@v \@quesse #3}#2%
  287.   \else \ifx #1\@unquiEva \nun@tehta {\q@c@v \@unque #3}#2%
  288.   \else \nun@tehta {\q@c@v #1#3}#2%
  289.   \fi\fi\fi\fi
  290.   \ifx <#4\let \next \relax \else \def \next {\@teka #4#5>}\fi
  291.   \next}
  292.  
  293. \def \q@c@v #1#2{% choosing whether to use vowel tehta
  294.                  % depending on vocalisation
  295.   \ifx #2a\if@light #1\else \Oman@tengwa #1a\fi
  296.   \else \Oman@tengwa #1#2%
  297.   \fi}
  298.  
  299. %%%%%%%%%%%%%%%%%%%%%%%%%%% Quenya  scanner %%%%%%%%%%%%%%%%%%%%%%%%%%%
  300.  
  301. \def \q@kerta #1>#2{%
  302.   \ifcat #2a\csname #2@q\endcsname #1>%
  303.   \else \ifcat #2.\expandafter \@@teka \m@m>#2\def \m@m {\sinta@kolindo ::}%
  304.   \fi\fi}
  305.  
  306. \def \a@q #1#2#3#4>{%
  307.   \ifx #3:\def \m@m {#1#2a#4}%
  308.   \else \def \m@m {\sinta@kolindo :a#4#1#2#3}%
  309.   \fi}
  310.  
  311. \def \e@q #1>{\q@quanta@Oman #1>eE}
  312. \def \o@q #1>{\q@quanta@Oman #1>oO}
  313.  
  314. \def \q@quanta@Oman #1#2#3#4>#5#6{%
  315.   \ifx #3:\def \m@m {#1#2#5#4}%
  316.   \else \ifx #3#5\def \m@m  {#1#2#6#4}%
  317.   \else \def \m@m {\sinta@kolindo :#5#4#1#2#3}%
  318.   \fi\fi}
  319.  
  320. \def \i@q #1#2#3#4>{%
  321.   \ifx #3:\def \m@m {#1#2i#4}%
  322.   \else
  323.     \edef \m@m {%
  324.       \sinta@kolindo ::#4\ifx #1\sinta@kolindo \else #1::\fi \@yanta :#3}%
  325.   \fi}
  326.  
  327. \def \u@q #1#2#3#4>{%
  328.   \ifx #3:%
  329.     \ifx #1\@quessiEva \def \m@m {\@quesse #2#3#4}%
  330.     \else \ifx #1\@unquiEva \def \m@m {\@unque #2#3#4}%
  331.     \else \def \m@m {#1#2u#4}%
  332.     \fi\fi
  333.   \else \ifx #3u\def \m@m  {#1#2U#4}%
  334.   \else
  335.     \edef \m@m
  336.      {\sinta@kolindo ::#4\ifx #1\sinta@kolindo \else #1::\fi \@Ure :#3}%
  337.   \fi\fi}
  338.  
  339. \def \A@q #1>{\q@anda@Oman #1>a}
  340. \def \E@q #1>{\q@anda@Oman #1>e}
  341. \def \I@q #1>{\q@anda@Oman #1>i}
  342. \def \O@q #1>{\q@anda@Oman #1>o}
  343. \def \U@q #1>{\q@anda@Oman #1>u}
  344.  
  345. \def \q@anda@Oman #1#2#3#4>#5{%
  346.   \edef \m@m
  347.    {\sinta@kolindo ::#4%
  348.     \ifx #1\sinta@kolindo
  349.       \ifx #3:\else ::#3\fi
  350.     \else #1#2#3\fi \anda@kolindo :#5}}
  351.  
  352. \def \b@q #1#2#3#4>{\edef \m@m {\@umbar ::#4\ifx #1\@lambe l::\fi}}
  353.  
  354. \def \d@q #1#2#3#4>{%
  355.   \edef \m@m
  356.    {\ifx #1\@lambe \@alda
  357.     \else \ifx #1\@rOmen \@arda
  358.     \else \@ando \fi\fi ::#4}}
  359.  
  360. \def \g@q #1#2#3#4>{\def \m@m {\@anga ::#4}}
  361.  
  362. \def \h@q #1#2#3#4>{%
  363.   \ifx #3:%
  364.     \ifx #1\sinta@kolindo \def \m@m {\@hyarmen ::#4}%
  365.     \else \edef \m@m {\@hyarmen ::#4#1::}%
  366.     \fi
  367.   \else \def \m@m {\hyarmen ::#4#1#2#3}%  
  368.   \fi}
  369.  
  370. \def \f@q #1>{\q@Upunta #1>\@formen T}
  371. \def \G@q #1>{\q@Upunta #1>\@anna T}
  372. \def \H@q #1>{\q@Upunta #1>\@Harma T}
  373. \def \l@q #1>{\q@Upunta #1>\@lambe L}
  374. \def \m@q #1>{\q@Upunta #1>\@malta D}
  375. \def \n@q #1>{\q@Upunta #1>\@nUmen D}
  376. \def \N@q #1>{\q@Upunta #1>\@Noldo D}
  377. \def \r@q #1>{\q@Upunta #1>\@rOmen T}
  378. \def \R@q #1>{\q@Upunta #1>\@Ore T}
  379. \def \S@q #1>{\q@Upunta #1>\@TUle T}
  380. \def \v@q #1>{\q@Upunta #1>\@vala T}
  381. \def \z@q #1>{\q@Upunta #1>\@esse T}
  382.  
  383. \def \q@Upunta #1#2#3#4>#5#6{%
  384.   \ifx #3:%
  385.     \ifx #1\sinta@kolindo \def \m@m {#5::#4}%
  386.     \else \ifx #1#5\def \m@m {#5#6:#4}%
  387.     \else \edef \m@m {#5::#4\ifx #1\@hyarmen \@halla \else #1\fi ::}%
  388.     \fi\fi
  389.   \else \def \m@m {#5::#4#1#2#3}%  
  390.   \fi}
  391.  
  392. \def \s@q #1#2#3#4>{%
  393.   \ifx #3:%
  394.     \ifx #1\sinta@kolindo \def \m@m {\@silme ::#4}%
  395.     \else \ifx #1\@silme \def \m@m {\@esse ::#4}%
  396.     \else
  397.       \edef \m@m
  398.        {#1\ifx #1\@calma x\else \ifx #1\@lambe x\else s\fi\fi :#4}%
  399.     \fi\fi
  400.   \else \def \m@m {\@silme ::#4#1#2#3}%
  401.   \fi}
  402.  
  403. \def \w@q #1#2#3#4>{%
  404.   \ifx #3:%
  405.     \ifx #1\sinta@kolindo \def \m@m {\@wilya ::#4}%
  406.     \else \ifx #1\@anga \def \m@m {\@ungwe ::#4}%
  407.     \else \ifx #1\@harma \def \m@m {\@hwesta ::#4}%
  408.     \else \ifx #1\@hyarmen \def \m@m {\@hwesta ::#4}%
  409.     \else \ifx #1\@Noldo \def \m@m {\@Nwalme ::#4}%
  410.     \else \def \m@m {\@wilya ::#4#1::}%
  411.     \fi\fi\fi\fi\fi
  412.   \else \def \m@m {\@wilya ::#4#1#2#3}%  
  413.   \fi}
  414.  
  415. \def \x@q #1#2#3#4>{%
  416.   \edef \m@m{%
  417.     \@calma x:#4%
  418.     \ifx #3:\ifx #1\sinta@kolindo \else #1::\fi\else #1#2#3\fi }}    
  419.  
  420. \def \y@q #1#2#3#4>{%
  421.   \ifx #3:%
  422.     \edef \m@m {%
  423.       \ifx #1\sinta@kolindo \@anna \else #1\fi
  424.       \ifx #1\@rOmen r\else \ifx #1\@lambe l\else y\fi\fi :#4}%
  425.   \else \def \m@m {\@anna y:#4#1#2#3}%
  426.   \fi}
  427.  
  428. \def \c@q #1>{\q@punta #1>\@calma \@nUmen \@anca}
  429. \let \k@q \c@q
  430. \def \p@q #1>{\q@punta #1>\@parma \@malta \@ampa}
  431. \def \q@q #1>{\q@punta #1>\@quessiEva \@nUmen \@unquiEva}
  432.  
  433. \def \q@punta #1#2#3#4>#5#6#7{%
  434.   \ifx #3:%
  435.     \ifx #1\sinta@kolindo \def \m@m {#5::#4}%
  436.     \else \ifx #1#5\def \m@m {#5T:#4}%
  437.     \else \ifx #1#6\def \m@m {#7::#4}%
  438.     \else \def \m@m {#5::#4#1::}%
  439.     \fi\fi\fi
  440.   \else \def \m@m {#5::#4#1#2#3}%
  441.   \fi}
  442.  
  443. \def \t@q #1#2#3#4>{%
  444.   \ifx #3:%
  445.     \ifx #1\sinta@kolindo \def \m@m {\@tinco ::#4}%
  446.     \else \ifx #1\@hyarmen \def \m@m {\@tinco ::#4\@Harma ::}%
  447.     \else \ifx #1\@tinco \def \m@m {\@tinco T:#4}%
  448.     \else \ifx #1\@nUmen \def \m@m {\@anto ::#4}%
  449.     \else \def \m@m {\@tinco ::#4#1::}%
  450.     \fi\fi\fi\fi
  451.   \else \def \m@m {\@tinco ::#4#1#2#3}%
  452.   \fi}
  453.  
  454.  
  455. %%%%%%%%%%%%%%%%%%% macro definitions  for Sindarin %%%%%%%%%%%%%%%%%%%
  456.  
  457. \def \oright {\def \o@sind {o}\def \u@sind {u}\def \O@sind {O}\def \U@sind {U}}
  458. \def \oleft  {\def \o@sind {u}\def \u@sind {o}\def \O@sind {U}\def \U@sind {O}}
  459.  
  460. \newif \if@ninOre
  461. \def \ninnUmen {%
  462.   \@ninOrefalse
  463.   \let \n@sind \@nUmen \let \m@sind \@malta \def \n@gem {N}}
  464. \def \ninOre {%
  465.   \@ninOretrue
  466.   \let \n@sind \@Ore   \let \m@sind \@vala  \def \n@gem {:}}
  467.  
  468. \def \vinquesse{% use only the quessetEma
  469.   \let \c@sind \@quesse  \let \k@sind \@quesse  \let \g@sind \@ungwe
  470.   \let \ch@sind \@hwesta \let \kh@sind \@hwesta \let \gh@sind \@unque
  471.   \let \N@sind \@Nwalme}
  472. \def \vaswestron{% use both the calmatEma and the quessetEma
  473.   \let \c@sind \@calma   \let \k@sind \@quesse  \let \g@sind \@ungwe
  474.   \let \ch@sind \@hwesta \let \kh@sind \@hwesta \let \gh@sind \@unque
  475.   \let \N@sind \@Nwalme}
  476. \def \vincalma{% use only the calmatEma
  477.   \let \c@sind \@calma   \let \k@sind \@calma   \let \g@sind \@anga
  478.   \let \ch@sind \@Harma  \let \kh@sind \@Harma  \let \gh@sind \@anca
  479.   \let \N@sind \@Noldo}
  480.  
  481. \def \sindarin {%
  482.   \let \kara@kerta \s@kerta
  483.   \oright \ninnUmen \vinquesse
  484.   \def \vinya@quetta {\def \m@m {::\sinta@kolindo :}}%
  485.   \def \quetto@metta {\expandafter \@@teitho \m@m>}}
  486.  
  487. \def \@@teitho #1#2#3#4#5>{%
  488.   \ifx #1:\ifx #3\sinta@kolindo \ifx \relax #5\relax \else \@teithoi #5<>\fi
  489.   \else \@teithoi #5#1#2#3#4<>\fi \else \@teithoi #5#1#2#3#4<>\fi}
  490.  
  491. \def \@teithoi #1#2#3#4#5#6>{%
  492.   \ifx #3\@phormen
  493.     \ifx #5<\s@v@t@c@t #1#2\@formen #4%
  494.     \else \ifx #1:\s@v@t@c@t #1#2\@formen #4%
  495.     \else \s@v@t@c@t #1#2\@formen T%
  496.     \fi\fi
  497.   \else \ifx #3\sinta@kolindo
  498.     \ifx #5<\@Oman@tengwa #1\sinta@kolindo
  499.     \else \ifx #1i\@yanta
  500.     \else \@Oman@tengwa #1\sinta@kolindo
  501.     \fi\fi
  502.   \else \@teithoo #1#2#3#4#5%
  503.   \fi\fi
  504.   \ifx <#5\let \next \relax \else \def \next {\@teithoii #5#6>}\fi
  505.   \next}
  506.  
  507. \def \@teithoii #1#2#3#4#5#6>{%
  508.   \ifx #3\@phormen
  509.     \ifx #5<\s@v@t@c@t #1#2\@formen #4\else \s@v@t@c@t #1#2\@formen T\fi
  510.   \else \@teithoo #1#2#3#4#5%
  511.   \fi
  512.   \ifx <#5\let \next \relax \else \def \next {\@teithoii #5#6>}\fi
  513.   \next}
  514.  
  515. \def \@teithoo #1#2#3#4#5{%
  516.   \ifx #3\@formen
  517.     \ifx #5<\s@v@t@c@t #1#2\@ampa #4\else \s@v@t@c@t #1#2\@formen #4\fi
  518.   \else \ifx #3\@rOmen
  519.     \if@ninOre
  520.       \s@v@t@c@t #1#2#3#4%
  521.     \else
  522.       \ifx #5<\s@v@t@c@t #1#2\@Ore #4%
  523.       \else \s@v@t@c@t #1#2\@rOmen #4%
  524.       \fi
  525.     \fi
  526.   \else \s@v@t@c@t #1#2#3#4%
  527.   \fi\fi}
  528.  
  529. \def \s@v@t@c@t #1#2#3#4{%
  530.   \nun@tehta {%
  531.     \ifx #1:\ifx #2:#3%
  532.       \else \tehta@tengwa #3#2%
  533.       \fi 
  534.     \else\ifx #2:\Oman@tengwa #3#1%
  535.       \else
  536.         \expandafter \ama@tehta \csname #1@tehta\endcsname
  537.          {\tehta@tengwa #3#2}%
  538.       \fi 
  539.     \fi}%
  540.   #4}
  541.  
  542. %%%%%%%%%%%%%%%%%%%%%%%%%% Sindarin  scanner %%%%%%%%%%%%%%%%%%%%%%%%%%
  543.  
  544. \def \s@kerta #1>#2{%
  545.   \ifcat #2a\csname #2@s\endcsname #1>%
  546.   \else \ifcat #2.%
  547.     \expandafter \@@teitho \m@m>#2\def \m@m {::\sinta@kolindo :}%
  548.   \fi\fi}
  549.  
  550. \def \a@s #1>{\s@quanta@Oman #1>a}
  551. \def \y@s #1>{\s@quanta@Oman #1>y}
  552.  
  553. \def \s@quanta@Oman #1#2#3#4#5>#6{%
  554.   \ifx #3\sinta@kolindo
  555.     \edef \m@m {#6:\sinta@kolindo :#5\ifx #1:\else #1:\sinta@kolindo :\fi}%
  556.   \else \def \m@m {#6:\sinta@kolindo :#5#1#2#3#4}%
  557.   \fi}
  558.  
  559. \def \e@s #1#2#3#4#5>{%
  560.   \ifx #3\sinta@kolindo
  561.     \ifx #1a\def \m@m {::\sinta@kolindo :#5a:\@yanta :}%
  562.     \else \ifx #1o\def \m@m {::\sinta@kolindo :#5o:\@yanta :}%
  563.     \else \ifx #1e\def \m@m {E:\sinta@kolindo :#5}%
  564.     \else
  565.       \edef \m@m {e:\sinta@kolindo :#5\ifx #1:\else #1:\sinta@kolindo :\fi}%
  566.     \fi\fi\fi
  567.   \else \def \m@m {e:\sinta@kolindo :#5#1#2#3#4}%
  568.   \fi}
  569.  
  570. \def \i@s #1#2#3#4#5>{%
  571.   \ifx #3\sinta@kolindo
  572.     \ifx #1:\def \m@m {i:\sinta@kolindo :#5}%
  573.     \else \def \m@m{::\sinta@kolindo :#5#1:\@anna :}%
  574.     \fi
  575.   \else \def \m@m {i:\sinta@kolindo :#5#1#2#3#4}%
  576.   \fi}
  577.  
  578. \def \o@s #1#2#3#4#5>{%
  579.   \ifx #3\sinta@kolindo
  580.     \ifx #1\o@sind \edef \m@m {\O@sind:\sinta@kolindo :#5}%
  581.     \else
  582.       \edef \m@m
  583.        {\o@sind :\sinta@kolindo :#5\ifx #1:\else #1:\sinta@kolindo :\fi}%
  584.     \fi
  585.   \else \edef \m@m {\o@sind :\sinta@kolindo :#5#1#2#3#4}%
  586.   \fi}
  587.  
  588. \def \u@s #1#2#3#4#5>{%
  589.   \ifx #3\sinta@kolindo
  590.     \ifx #1:\def \m@m {\u@sind :\sinta@kolindo :#5}%
  591.     \else \ifx #1\u@sind \edef \m@m {\U@sind:\sinta@kolindo :#5}%
  592.     \else \def \m@m{::\sinta@kolindo :#5#1:\@Ure :}%
  593.     \fi\fi
  594.   \else \def \m@m {\u@sind :\sinta@kolindo :#5#1#2#3#4}%
  595.   \fi}
  596.  
  597. \def \A@s #1>{\s@anda@Oman #1>a}
  598. \def \E@s #1>{\s@anda@Oman #1>e}
  599. \def \I@s #1>{\s@anda@Oman #1>i}
  600. \def \O@s #1>{\s@anda@Oman #1>o}
  601. \def \U@s #1>{\s@anda@Oman #1>u}
  602. \def \Y@s #1>{\s@anda@Oman #1>y}
  603.  
  604. \def \s@anda@Oman #1#2#3#4#5>#6{%
  605.   \edef \m@m
  606.    {::\sinta@kolindo :#5%
  607.     \ifx #1:\ifx #3\sinta@kolindo \else :#2#3:\fi \else #1#2#3#4\fi
  608.     #6:\anda@kolindo :}}
  609.  
  610. \def \f@s #1>{\s@surya #1>\@formen T}
  611. \def \l@s #1>{\s@surya #1>\@lambe L}
  612. \def \r@s #1>{\s@surya #1>\@rOmen T}
  613. \def \R@s #1>{\if@ninOre \s@surya #1>\@rOmen T\else \s@surya #1>\@Ore T\fi}
  614. \def \v@s #1>{\s@surya #1>\@ampa D}
  615.  
  616. \def \s@surya #1#2#3#4#5>#6#7{%
  617.   \ifx #3\sinta@kolindo \def \m@m {#1:#6:#5}%
  618.   \else \ifx #3#6\def \m@m {#1#2#6#7#5}%
  619.   \else \def \m@m {::#6:#5#1#2#3#4}%
  620.   \fi\fi}
  621.  
  622. \def \b@s #1>{\s@punta #1>\@umbar \m@sind \landa@ama@falma D}
  623. \def \c@s #1>{\s@punta #1>\c@sind \n@sind \arka@ama@falma T}
  624. \def \d@s #1>{\s@punta #1>\@ando \n@sind \landa@ama@falma D}
  625. \def \g@s #1>{\s@punta #1>\g@sind \n@sind \landa@ama@falma D}
  626. \def \j@s #1>{\s@punta #1>\@anca \n@sind \landa@ama@falma D}
  627. \def \k@s #1>{\s@punta #1>\k@sind \n@sind \arka@ama@falma T}
  628. \def \p@s #1>{\s@punta #1>\@parma \m@sind \arka@ama@falma T}
  629. \def \t@s #1>{\s@punta #1>\@tinco \n@sind \arka@ama@falma T}
  630.  
  631. \def \s@punta #1#2#3#4#5>#6#7#8#9{%
  632.   \ifx #3\sinta@kolindo \def \m@m {#1:#6:#5}%
  633.   \else \ifx #3#6\def \m@m {#1#2#6#9#5}%
  634.   \else \ifx #3#7\def \m@m {#1#8#6:#5}%
  635.   \else \def \m@m {::#6:#5#1#2#3#4}%
  636.   \fi\fi\fi}
  637.  
  638. \def \m@s #1>{\s@nengwea #1>\m@sind \@malta }
  639. \def \n@s #1>{\s@nengwea #1>\n@sind \@nUmen }
  640.  
  641. \def \s@nengwea #1#2#3#4#5>#6#7{%
  642.   \ifx #3\sinta@kolindo \def \m@m {#1:#6:#5}%
  643.   \else \ifx #3#6\edef \m@m {#1\if@ninOre :\else \landa@ama@falma \fi #7:#5}%
  644.   \else \def \m@m {::#6:#5#1#2#3#4}%
  645.   \fi\fi}
  646.  
  647. \def \N@s #1#2#3#4#5>{%
  648.   \ifx #3\sinta@kolindo \def \m@m {#1:\N@sind :#5}%
  649.   \else \ifx #3\N@sind \edef \m@m {#1\landa@ama@falma \N@sind :#5}%
  650.   \else \def \m@m {::\N@sind :#5#1#2#3#4}%
  651.   \fi\fi}
  652.  
  653. \def \h@s #1#2#3#4#5>{%
  654.   \ifx #3\sinta@kolindo \def \m@m {#1:\@hyarmen :#5}%
  655.   \else \ifx #3\@tinco \def \m@m {#1#2\@TUle :#5}%
  656.   \else \ifx #3\@ando \def \m@m {#1#2\@anto :#5}%
  657.   \else \ifx #3\@parma \def \m@m {#1#2\@phormen :#5}%
  658.   \else \ifx #3\@umbar \def \m@m {#1#2\@ampa :#5}%
  659.   \else \ifx #3\@malta \def \m@m {#1\landa@ama@falma \@ampa :#5}%
  660.   \else \ifx #3\c@sind \def \m@m {#1#2\ch@sind :#5}%
  661.   \else \ifx #3\g@sind \def \m@m {#1#2\gh@sind :#5}%
  662.   \else \ifx #3\@lambe \def \m@m {#1#2\@alda :#5}%
  663.   \else \ifx #3\@rOmen \def \m@m {#1#2\@arda :#5}%
  664.   \else \ifx #3\@silme \def \m@m {#1#2\@Harma :#5}%
  665.   \else \ifx #3\@esse \def \m@m {#1#2\@anca :#5}%
  666.   \else \def \m@m {::\@hyarmen :#5#1#2#3#4}%
  667.   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
  668.  
  669. \def \H@s #1#2#3#4#5>{%
  670.   \ifx #3\sinta@kolindo \def \m@m {#1:\@hyarmen :#5}%
  671.   \else \def \m@m {::\@hyarmen :#5#1#2#3:}%
  672.   \fi}
  673.  
  674. \def \s@s #1#2#3#4#5>{%
  675.   \ifx #3\sinta@kolindo \def \m@m {#1:\@silme :#5}%
  676.   \else \ifx #3\@silme \def \m@m {#1#2\@esse :#5}%
  677.   \else \def \m@m {#1#2#3s#5}%
  678.   \fi\fi}
  679.  
  680. \def \w@s #1#2#3#4#5>{%
  681.   \ifx #3\sinta@kolindo \def \m@m {#1:\@wilya :#5}%
  682.   \else \ifx #3\@hyarmen \def \m@m {#1#2\@hwesta@sindarinwa :#5}%
  683.   \else \ifx #2:\def \m@m {#1\w@tehta #3:#5}%
  684.   \else \def \m@m {::\@wilya :#5#1#2#3:}%
  685.   \fi\fi\fi}
  686.  
  687. \def \z@s #1#2#3#4#5>{%
  688.   \ifx #3\sinta@kolindo \def \m@m {#1:\@esse :#5}%
  689.   \else \def \m@m {::\@esse :#5#1#2#3:}%
  690.   \fi}
  691.  
  692.  
  693. %%%%%%%%%%%%%%%%%% macro definitions for Beleriandic %%%%%%%%%%%%%%%%%%
  694.  
  695. \newif \ifsinta@Oman % short vowel just read
  696. \newif \if@thegra    % first letter of a word
  697.  
  698. \def \beleriand {%
  699.   \let \kara@kerta \b@kerta
  700.   \ninOre \vincalma
  701.   \def \vinya@quetta {\def \m@m {:::}\sinta@Omanfalse \@thegratrue }%
  702.   \def \quetto@metta {\expandafter \tEw@mhedui \m@m }}
  703.  
  704. \def \@garo #1{\def \m@m {#1}\@thegrafalse }
  705.  
  706. \def \@teitho #1#2#3>{%
  707.   \ifx #2:%
  708.   \else \ifx #2\@phormen
  709.     \if@thegra \b@t@c@t #1\@formen#3\else \b@t@c@t #1\@formen T\fi
  710.   \else \ifx #2\i@iEva
  711.     \b@t@c@t #1\sinta@kolindo#3%
  712.   \else \b@t@c@t #1#2#3%
  713.   \fi\fi\fi }
  714.  
  715. \def \@teithov #1#2#3>{%
  716.   \ifx #2\i@iEva \anda@kolindo\else \@teitho #1#2#3>\fi }
  717.  
  718. \def \tEw@mhedui #1#2#3{%
  719.   \ifx #2\i@iEva \sinta@kolindo
  720.   \else \ifx #2\@formen \b@t@c@t #1\@ampa #3%
  721.   \else \ifx #2\@phormen \b@t@c@t #1\@formen#3%
  722.   \else \ifx #2\@rOmen%
  723.     \if@ninOre \b@t@c@t #1\@rOmen #3\else \b@t@c@t #1\@Ore #3\fi
  724.   \else \b@t@c@t #1#2#3%
  725.   \fi\fi\fi\fi }
  726.  
  727. \def \b@t@c@t #1#2#3{%
  728.   \nun@tehta {\ifx #1:#2\else \tehta@tengwa #2#1\fi }#3}
  729.  
  730. %%%%%%%%%%%%%%%%%%%%%%%%% Beleriandic scanner %%%%%%%%%%%%%%%%%%%%%%%%%
  731.  
  732. \def \b@kerta #1>#2{%
  733.   \ifcat #2a\csname #2@b\endcsname #1>%
  734.   \else \ifcat #2.\m@m
  735.   \fi\fi }
  736.  
  737. \def \a@b #1>{\b@quanta@Oman #1>\a@tengwa }
  738. \def \y@b #1>{\b@quanta@Oman #1>\y@tengwa }
  739.  
  740. \def \b@quanta@Oman #1#2#3>#4{%
  741.   \ifx #2:\else \@teithov #1#2#3>\fi
  742.   \@garo {:#4:}\sinta@Omantrue }
  743.  
  744. \def \e@b #1>{\b@tanta@Oman #1>\@yanta }
  745. \def \o@b #1>{\b@tanta@Oman #1>\o@tengwa }
  746.  
  747. \def \b@tanta@Oman #1#2#3>#4{%
  748.   \ifx #2#4\@garo {\@andaith #4:}\sinta@Omanfalse
  749.   \else
  750.     \ifx #2:\else \@teithov #1#2#3>\fi
  751.     \@garo {:#4:}\sinta@Omantrue
  752.   \fi}
  753.  
  754. \def \i@b #1>{%
  755.   \if@thegra \b@per@Oman #1>\i@iEva \y@tehta
  756.   \else \b@per@Oman #1>\sinta@kolindo \y@tehta
  757.   \fi }
  758. \def \u@b #1#2#3>{%
  759.   \ifx #2\@Ure \@garo {\@andaith \@Ure :}\sinta@Omanfalse
  760.   \else \b@per@Oman #1#2#3>\@Ure \w@tehta
  761.   \fi }
  762.  
  763. \def \b@per@Oman #1#2#3>#4#5{%
  764.   \ifsinta@Oman \@garo {#5#2:}\sinta@Omanfalse
  765.   \else
  766.     \ifx #2:\else \@teithov #1#2#3>\fi
  767.     \@garo {:#4:}\sinta@Omantrue
  768.   \fi}
  769.  
  770. \def \b@per@Oman #1#2#3>#4#5{%
  771.   \ifx #2#4\@garo {\@andaith #4:}\sinta@Omanfalse
  772.   \else \ifsinta@Oman \@garo {#5#2:}\sinta@Omanfalse
  773.   \else
  774.     \ifx #2:\else \@teithov #1#2#3>\fi
  775.     \@garo {:#4:}\sinta@Omantrue
  776.   \fi\fi}
  777.  
  778. \def \A@b #1>{\b@anda@Oman #1>\a@tengwa }
  779. \def \E@b #1>{\b@anda@Oman #1>\@yanta}
  780. \def \I@b #1>{\b@anda@Oman #1>\sinta@kolindo }
  781. \def \O@b #1>{\b@anda@Oman #1>\o@tengwa }
  782. \def \U@b #1>{\b@anda@Oman #1>\@Ure }
  783. \def \Y@b #1>{\b@anda@Oman #1>\y@tengwa }
  784.  
  785. \def \b@anda@Oman #1#2#3>#4{%
  786.   \ifx #2:\else \@teithov #1#2#3>\fi
  787.   \@garo {\@andaith #4:}\sinta@Omanfalse }
  788.  
  789. \def \f@b #1>{\b@surya #1>\@formen D}
  790. \def \l@b #1>{\b@surya #1>\@lambe L}
  791. \def \r@b #1>{\b@surya #1>\@rOmen T}
  792. \def \R@b #1>{\if@ninOre \b@surya #1>\@rOmen T\else \b@surya #1>\@Ore T\fi}
  793. \def \v@b #1>{\b@surya #1>\@ampa D}
  794.  
  795. \def \b@surya #1#2#3>#4#5{%
  796.   \ifx #2#4\@garo {#1#2#5}%
  797.   \else
  798.     \ifx #2:\else \@teitho #1#2#3>\fi
  799.     \@garo {:#4:}%
  800.   \fi \sinta@Omanfalse }
  801.  
  802. \def \s@b #1#2#3>{%
  803.   \ifx #2\@silme \@garo {:\@esse :}%
  804.   \else
  805.     \ifx #2:\else \@teitho #1#2#3>\fi
  806.     \@garo {:\@silme :}%
  807.   \fi \sinta@Omanfalse }
  808.  
  809. \def \c@b #1>{\b@punta #1>\c@sind \n@sind \arka@ama@falma T}
  810. \def \b@b #1>{\b@punta #1>\@umbar \m@sind \landa@ama@falma D}
  811. \def \d@b #1>{\b@punta #1>\@ando \n@sind \landa@ama@falma D}
  812. \def \g@b #1>{\b@punta #1>\g@sind \n@sind \landa@ama@falma D}
  813. \def \j@b #1>{\b@punta #1>\@anca \n@sind \landa@ama@falma D}
  814. \def \k@b #1>{\b@punta #1>\k@sind \n@sind \arka@ama@falma T}
  815. \def \p@b #1>{\b@punta #1>\@parma \m@sind \arka@ama@falma T}
  816. \def \t@b #1>{\b@punta #1>\@tinco \n@sind \arka@ama@falma T}
  817.  
  818. \def \b@punta #1#2#3>#4#5#6#7{%
  819.   \ifx #2#4\@garo {#1#2#7}%
  820.   \else \ifx #2#5\@garo {#6#4:}%
  821.   \else
  822.     \ifx #2:\else \@teitho #1#2#3>\fi
  823.     \@garo {:#4:}%
  824.   \fi\fi \sinta@Omanfalse }
  825.  
  826. \def \m@b #1>{\b@nengwea #1>\m@sind \@malta \landa@ama@falma }
  827. \def \n@b #1>{\b@nengwea #1>\n@sind \@nUmen \arka@ama@falma }
  828.  
  829. \def \b@nengwea #1#2#3>#4#5#6{%
  830.   \ifx #2#4%
  831.     \if@ninOre \@garo {:#5:}\else \@garo {#6#2:}\fi
  832.   \else
  833.     \ifx #2:\else \@teitho #1#2#3>\fi
  834.     \@garo {:#4:}%
  835.   \fi \sinta@Omanfalse }
  836.  
  837. \def \N@b #1#2#3>{%
  838.   \ifx #2\N@sind
  839.     \@garo {\landa@ama@falma \N@sind :}%
  840.   \else
  841.     \ifx #2:\else \@teitho #1#2#3>\fi
  842.     \@garo {:\N@sind :}%
  843.   \fi \sinta@Omanfalse }
  844.  
  845. \def \h@b #1#2#3>{%
  846.   \ifx #2\@tinco \@garo {#1\@TUle :}%
  847.   \else \ifx #2\@ando \@garo {#1\@anto :}%
  848.   \else \ifx #2\@parma \@garo {#1\@phormen :}%
  849.   \else \ifx #2\@umbar \@garo {#1\@ampa :}%
  850.   \else \ifx #2\m@sind \@garo {\landa@ama@falma \@ampa :}%
  851.   \else \ifx #2\c@sind \@garo {#1\ch@sind :}%
  852.   \else \ifx #2\g@sind \@garo {#1\gh@sind :}%
  853.   \else \ifx #2\@lambe \@garo {#1\@alda :}%
  854.   \else \ifx #2\@rOmen \@garo {#1\@arda :}%
  855.   \else \ifx #2\@silme \@garo {#1\@Harma :}%
  856.   \else \ifx #2\@esse \@garo {#1\@anca :}%
  857.   \else
  858.     \ifx #2:\else \@teitho #1#2#3>\fi
  859.     \@garo {:\@hyarmen :}%
  860.   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \sinta@Omanfalse }
  861.  
  862. \def \H@b #1#2#3>{%
  863.   \ifx #2:\else \@teitho #1#2#3>\fi
  864.   \@garo {:\@hyarmen :}%
  865.   \sinta@Omanfalse }
  866.  
  867. \def \w@b #1#2#3>{%
  868.   \ifx #2\@hyarmen \@garo {:\@hwesta@sindarinwa :}%
  869.   \else
  870.     \ifx #2:\@garo {:\@wilya :}%
  871.     \else \ifx #1:\@garo {\w@tehta #2:}%
  872.     \else \@teitho #1#2#3>\@garo {:\@wilya :}%
  873.     \fi\fi
  874.   \fi \sinta@Omanfalse }
  875.  
  876. \def \z@b #1#2#3>{%
  877.   \ifx #2:\else \@teitho #1#2#3>\fi
  878.   \@garo {:\@esse :}%
  879.   \sinta@Omanfalse }
  880.  
  881.  
  882. %%%%%%%%%%%%%%%%%%%%%% ignore  all other letters %%%%%%%%%%%%%%%%%%%%%%
  883.  
  884. \@tfor\ch@r:={BCDFJKLMPQTVWXYZj}\do{%
  885.   \expandafter \def \csname \ch@r @q\endcsname #1#2#3#4>{}}
  886.  
  887. \@tfor\ch@r:={BCDFGJKLMPQSTVWXZqx}\do{%
  888.   \expandafter \def \csname \ch@r @s\endcsname #1#2#3#4>{}%
  889.   \expandafter \def \csname \ch@r @b\endcsname #1#2#3#4>{}}
  890.